<template>
    <div id="ProcessDetails">
        <van-tabs class="subTab" color="#007DFB" line-width="60px" line-height="4px" title-active-color="#007DFB"
            v-model="active" @click="handleclickto" swipeable>
            <van-tab title="危改信息">
                <div class="vanpopupCon">
                    <div style="font-size: 20px;font-weight: bold;margin: 10px;">户主信息</div>
                    <van-field readonly v-model="formData.propertyPerson" label="户主姓名" />
                    <van-field readonly v-model="formData.householderIdcard" label="户主身份证号" />
                    <van-field readonly v-model="formData.householderPhone" label="联系电话" />
                    <van-field readonly v-model="formData.personNum" label="家庭人口数" />
                    <van-field readonly v-model="formData.checkNumber" label="自建房排查编号" />
                    <van-field readonly v-model="formData.cityName" label="家庭住址" />
                    <van-field readonly v-model="formData.detailAddress" label="详细住址" />
                    <van-field readonly v-model="formData.dataFrom" label="委托方式" />
                    <div style="font-size: 20px;font-weight: bold;margin: 10px;">危房情况</div>
                    <van-field readonly v-model="formDataZFXZ.buildYear" label="建造年份" />
                    <van-field readonly v-model="formDataZFXZ.buildArea" label="建造面积" />
                    <van-field readonly v-model="formDataZFXZ.structType" label="结构类型" />
                    <van-field readonly v-model="formDataZFXZ.buildFloor" label="房屋层数" />
                    <van-field readonly v-model="formDataZFXZ.coverArea" label="房屋占地面积" />
                    <van-field readonly v-model="formDataZFXZ.safeLevel" label="房屋安全等级" />
                    <van-field readonly v-model="formDataZFXZ.certificateNum" label="不动产权证号" />
                    <div style="font-size: 20px;font-weight: bold;margin: 10px;">安全监管信息</div>
                    <van-field readonly v-model="formDataAQJG.safePerson" label="安全监督责任人" />
                    <van-field readonly v-model="formDataAQJG.safePhone" label="安全监督责任人电话" />

                    <div style="font-size: 20px;font-weight: bold;margin: 10px;">初次鉴定信息</div>
                    <!-- {{ authenticateInfo1 }} -->
                    <van-field readonly v-model="authenticateInfo1.isAuth" label="无需鉴定可直接整治" />
                    <!-- <div v-if="JSON.stringify(authenticateInfo1)!='{}'"> -->
                    <van-field readonly v-if="authenticateInfo1.companyName" v-model="authenticateInfo1.companyName"
                        label="鉴定机构" />
                    <van-field readonly v-if="authenticateInfo1.companyUscc" v-model="authenticateInfo1.companyUscc"
                        label="统一社会信用代码" />
                    <div v-if="authenticateInfo1.isAuth == '否'">
                        <van-field readonly v-model="authenticateInfo1.appraiseType" label="房屋用途" />
                        <van-field readonly v-model="authenticateInfo1.appraiseLevel" label="房屋等级" />
                        <van-field readonly v-model="authenticateInfo1.appraiseDate" label="鉴定时间" />
                        <van-field readonly v-model="authenticateInfo1.appraiseNo" label="鉴定编号" />
                        <template v-if="fileHousePictureUrlList.length > 0">
                            <div style="font-size: 14px;margin: 10px;">
                                <p style="line-height: 26px;">房屋照片</p>
                                <van-uploader v-model="fileHousePictureUrlList" disabled />
                            </div>
                        </template>

                        <template
                            v-if="authenticateInfo1.fileReportUrlList && authenticateInfo1.fileReportUrlList.length > 0">
                            <div style="font-size: 14px;margin: 10px;">
                                <p style="line-height: 26px;">鉴定报告</p>
                                <ul>
                                    <li v-for="(item, index) in authenticateInfo1.fileReportUrlList" :key="index">
                                        <p style="line-height: 26px;" @click="getpreview(item, 2)">{{ item.fileName }}
                                        </p>
                                    </li>
                                </ul>
                            </div>
                        </template>
                    </div>
                    <!-- </div>  -->
                    <div v-if="JSON.stringify(formDataFHJD) != '{}'">
                        <div style="font-size: 20px;font-weight: bold;margin: 10px;">复核鉴定信息</div>
                        <van-field readonly v-model="formDataFHJD.companyName" label="鉴定机构" />
                        <van-field readonly v-model="formDataFHJD.companyUscc" label="统一社会信用代码" />
                        <van-field readonly v-model="formDataFHJD.appraiseLevel" label="房屋等级" />
                        <van-field readonly v-model="formDataFHJD.appraiseDate" label="鉴定时间" />
                        <van-field readonly v-model="formDataFHJD.appraiseNo" label="鉴定报告编号" />

                        <template v-if="fileHousePictureUrlList1.length > 0">
                            <div style="font-size: 14px;margin: 10px;">
                                <p style="line-height: 26px;">房屋照片</p>
                                <van-uploader v-model="fileHousePictureUrlList1" disabled />
                            </div>
                        </template>

                        <template v-if="formDataFHJD.fileReportUrlList.length > 0">
                            <div style="font-size: 14px;margin: 10px;">
                                <p style="line-height: 26px;">鉴定报告</p>
                                <ul>
                                    <li v-for="(item, index) in formDataFHJD.fileReportUrlList" :key="index">
                                        <p style="line-height: 26px;" @click="getpreview(item, 2)">{{ item.fileName }}
                                        </p>
                                    </li>
                                </ul>
                            </div>
                        </template>
                    </div>
                    <div style="font-size: 20px;font-weight: bold;margin: 10px;">整治方式信息</div>
                    <div v-if="wgxxInfo.userTypeName == '困难户'">
                        <van-field readonly v-model="formDataZZCSkn.applyType" label="组织实施方式" />
                        <van-field :name="formDataZZCSkn.removeDangerMode" label="整治方式">

                            <template #input>
                                <van-radio-group v-model="formDataZZCSkn.removeDangerMode" disabled>
                                    <van-radio name="维修加固">
                                        修缮加固面积
                                        <template v-if="Number(formDataZZCSkn.groundArea) >= 0">
                                            {{ Number(formDataZZCSkn.groundArea) }} 平方米
                                        </template>
                                    </van-radio>
                                    <van-radio name="拆除重建">
                                        拆除

                                        <template v-if="Number(formDataZZCSkn.removeArea) >= 0">
                                            {{ Number(formDataZZCSkn.removeArea) }} 平方米
                                        </template>

                                        <template v-if="Number(formDataZZCSkn.planRebuildArea) >= 0">
                                            ，计划重建面积 {{ Number(formDataZZCSkn.planRebuildArea) }} 平方米
                                        </template>
                                    </van-radio>
                                    <van-radio name="拆除灭失">拆除灭失</van-radio>
                                    <van-field label="安置">

                                        <template #input>
                                            <van-radio-group v-model="formDataZZCSkn.removeDangerMode" disabled>
                                                <van-radio name="拆除安置">拆除安置</van-radio>
                                                <van-radio name="置换安置">置换安置</van-radio>
                                                <van-radio name="租用安置">租用安置</van-radio>
                                                <van-radio name="无房户安置">无房户安置</van-radio>
                                            </van-radio-group>
                                        </template>
                                    </van-field>
                                </van-radio-group>
                            </template>
                        </van-field>
                    </div>
                    <div v-else>
                        <van-field readonly v-model="formDataZZCS.removeDangerMode" label="整治方式" />
                        <van-field readonly v-model="formDataZZCS.operateDate" label="整治开始时间" />
                        <van-field readonly v-model="formDataZZCS.finishDate" label="整治完成时间" />
                        <van-field readonly v-model="formDataZZCS.ZZcityName" label="整治后房屋地址" />
                        <van-field readonly v-model="formDataZZCS.address" label="详细住址" />
                        <van-field readonly v-model="formDataZZCS.renovateBaseArea" label="整治后基底面积" />
                        <van-field readonly v-model="formDataZZCS.revovateFloor" label="整治后层数" />
                        <van-field readonly v-model="formDataZZCS.renovateBuildArea" label="整治后建筑面积" />
                        <van-field readonly v-model="formDataZZCS.renovateStructure" label="整治后房屋结构" />
                        <van-field readonly v-model="formDataZZCS.operateDate" label="开工时间" />
                        <van-field readonly v-model="formDataZZCS.finishDate" label="竣工时间" />
                        <van-field readonly v-model="formDataZZCS.certificateCard" label="不动产权证号" />
                    </div>
                </div>
            </van-tab>
            <van-tab title="附件材料">
                <div class="vanpopupCon">
                    {{fileData}}
                    <ul v-if="fileData.length > 0">
                        <li v-for="(item, i) in fileData" :key="i">
                            <div class="text">
                                <div style="font-size: 18px;font-weight: bold;">{{ item.material_name }}</div>
                                <ul v-if="item.childFileList.length > 0">
                                    <li v-for="(item1, ind) in item.childFileList" :key="ind" style="margin-left: 10px;">

                                        <template v-if="item1.file_name.substring(item1.file_name.lastIndexOf('.') + 1, item1.file_name.length) == 'jpg' ||
                item1.file_name.substring(item1.file_name.lastIndexOf('.') + 1, item1.file_name.length) == 'png' ||
                item1.file_name.substring(item1.file_name.lastIndexOf('.') + 1, item1.file_name.length) == 'jpeg'
                ">
                                            <div v-if="item1.fileList && item1.fileList.length > 0">
                                                <van-uploader v-model="item1.fileList" disabled />
                                            </div>
                                        </template>
                                        <div v-else>
                                            <p @click="getpreview(item1, 1)">{{ item1.file_name }}</p>
                                        </div>
                                    </li>
                                </ul>
                                <div v-else>
                                    暂无附件
                                </div>
                            </div>
                        </li>
                    </ul>
                    <div v-else>
                        <div style="height: 100%; text-align: center; padding-top: 24vh">
                            <div style="margin-bottom: 10px">
                                <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/DSF/50.png" />
                            </div>
                            <div>暂无数据</div>
                        </div>
                    </div>
                </div>
            </van-tab>
        </van-tabs>
    </div>
</template>

<script>
import {
    houseRemoldV2Difficultyget,
    houseRemoldV2HousingStatusget,
    tFwZjfFxftgetSafe,
    dangerHouseRemoldauditInfoV2,
    houseRemoldFileGroupgetV2,
    selectListByIds,
    getRenovateDetail,
    houseRemoldV2Renovateget
} from '@/utils/api'
import axios from "axios";
export default {
    name: 'ProcessDetails',
    data() {
        return {
            active: 'first',
            formData: {},
            formDataZFXZ: {},
            formDataAQJG: {},
            authenticateInfo1: {
                isAuth: '是',
                companyName: '',
                companyUscc: '',
                appraiseType: '',
                appraiseLevel: '',
                appraiseDate: '',
                appraiseNo: '',
                fileReportUrlList: [],
            },
            formDataZZCS: {},
            formDataZZCSkn: {},
            fileData: [],
            fileHousePictureUrlList: [],
            fileHousePictureUrlList1: [],
            formDataFHJD: {},
            wgxxInfo: {}
        }
    },
    created() {
        // // this.wgxxInfo = JSON.parse(this.$store.state.wgxxInfo)
        // this.wgxxInfo = JSON.parse(this.$route.query.data)
        // console.log(this.wgxxInfo,'this.$store.state.wgxxInfo   info')
        // this.getdangerHouseRemoldauditInfoV2()
        // this.gethzinfo()
    },
    mounted() {
        // this.wgxxInfo = JSON.parse(this.$store.state.wgxxInfo)
        this.wgxxInfo = JSON.parse(this.$route.query.data)
        console.log(this.wgxxInfo, 'this.$store.state.wgxxInfo   info')
        if (this.wgxxInfo.userTypeName == '困难户') {
            this.getformDataZZCSkn()
        }
        // this.inData()
        this.getdangerHouseRemoldauditInfoV2()
        this.gethzinfo()
        this.getfileData()

        if (ZWJSBridge) {
            ZWJSBridge.setTitle({
                title: "审批进度",
            })
                .then((re2s) => {
                })
                .catch((err) => {
                });
        }
    },
    methods: {
        handleclickto(val) {
            if (val == 0) {
                this.getdangerHouseRemoldauditInfoV2()
                this.gethzinfo()
                // this.inData()
            } else {
                this.getfileData()
            }
        },
        getpreview: async function (item, type) {
            console.log(item, 'item')
            let url = '', file_name = ''
            if (type == 1) {
                file_name = item.file_name
            } else if (type == 2) {
                file_name = item.fileName
            }
            if (file_name.substring(file_name.lastIndexOf('.') + 1, file_name.length) == 'doc' ||
                file_name.substring(file_name.lastIndexOf('.') + 1, file_name.length) == 'docx') {
                this.$toast.fail('暂不支持word文件预览！')
                return
            }
            if (item.id) {
                //根据id获取
                url = window.g.BaseURL + 'api/upload/oss/preview?fileId=' + item.id
            } else {
                this.$toast.fail('暂无附件！')
                return
            }
            //跳转至view需要用户手动复制预览1
            //微信小程序需要端内打开
            if (window.sessionStorage.getItem('showBg2') == 'true') {
                this.$router.push({
                    path: '/PDFJSViewer',
                    query: {
                        path: url,
                    },
                })
            } else {
                //根据id获取
                let url1 = ''
                const res = await selectListByIds(item.id)
                url1 = window.g.BaseURL + res.data.data[0].path
                //iphone先这样处理
                if (ZWJSBridge) {
                    ZWJSBridge.openLink({
                        url: url1,
                    })
                        .then((res) => { })
                        .catch((err) => {
                            window.open(url1)
                        })
                }
            }
        },
        getfileData: async function () {
            let params = {
                state: 1,
                object_no: this.wgxxInfo.objectNo,
                node: this.wgxxInfo.processNode,
                repairStatus: this.wgxxInfo.repairStatus,
                removeDangerMode: this.formDataZZCS.removeDangerMode,
                isHasHouse: this.wgxxInfo.isHasHouse
            }
            const res = await houseRemoldFileGroupgetV2(params)
            if (res.data.data) {
                debugger
                this.fileData = res.data.data
                this.fileData.forEach(ele => {
                    if (ele.childFileList.length > 0) {
                        ele.childFileList.forEach((item, index) => {
                            item.fileList = []
                            if (item.file_name.substring(item.file_name.lastIndexOf('.') + 1, item.file_name.length) == 'jpg' ||
                                item.file_name.substring(item.file_name.lastIndexOf('.') + 1, item.file_name.length) == 'png' ||
                                item.file_name.substring(item.file_name.lastIndexOf('.') + 1, item.file_name.length) == 'jpeg'
                            ) {
                                item.fileList.push({
                                    id: item.id,
                                    url: window.g.BaseURL + 'api/upload/oss/preview?fileId=' + item.id,
                                    isImage: true
                                })
                            }
                        })
                    }

                })
            } else {
                this.fileData = [];
            }

        },
        getformDataZZCSkn: async function () {
            let params = {
                "objectNo": this.wgxxInfo.objectNo
                // "objectNo":"60e897333ebe46c5a118f32471ca29e3"
            }
            const ress = await houseRemoldV2Renovateget(params)
            if (ress.data.data != null) {
                this.formDataZZCSkn = ress.data.data[0]
                if (ress.data.data[0].applyType == 0) {
                    this.formDataZZCSkn.applyType = '乡（镇）人民政府组织实施'
                } else if (ress.data.data[0].applyType == 1) {
                    this.formDataZZCSkn.applyType = '乡（镇）人民政府监督由村级集体经济组织实施'
                } else if (ress.data.data[0].applyType == 2) {
                    this.formDataZZCSkn.applyType = '户主自行组织实施'
                }
            }
            console.log(this.formDataZZCSkn, 'this.formDataZZCSkn')
        },
        getdangerHouseRemoldauditInfoV2: async function () {
            this.fileHousePictureUrlList = []
            this.fileHousePictureUrlList1 = []
            let params = {
                "objectNo": this.wgxxInfo.objectNo
                // "objectNo":"60e897333ebe46c5a118f32471ca29e3"
            }
            const res3 = await dangerHouseRemoldauditInfoV2(params)
            // axios.post(
            //     `${window.g.BaseURL}/api/farmerHouse/dangerHouseRemold/auditInfoV2`, {
            //     objectNo: this.wgxxInfo.objectNo
            // }, {
            //     headers: {
            //     "isOutParam": true,
            //     "isOutParamS": true
            //     }
            // }).then(res3 => {
            // this.authenticateInfo1['isAuth'] = '是'
            if (res3.data.data.authenticateInfo != null) {
                this.authenticateInfo1 = res3.data.data.authenticateInfo
                // this.authenticateInfo1['isAuth'] = res3.data.data.authenticateInfo.isAuth?res3.data.data.authenticateInfo.isAuth: '是'
                // this.authenticateInfo1 = {
                //     'isAuth': res3.data.data.authenticateInfo.isAuth,
                //     'companyName':res3.data.data.authenticateInfo.companyName,
                //     'companyUscc': res3.data.data.authenticateInfo.companyUscc,
                //     'appraiseType': res3.data.data.authenticateInfo.appraiseType,
                //     'appraiseLevel': res3.data.data.authenticateInfo.appraiseLevel,
                //     'appraiseDate': res3.data.data.authenticateInfo.appraiseDate,
                //     'appraiseNo': res3.data.data.authenticateInfo.appraiseNo,
                //     'fileReportUrlList': res3.data.data.authenticateInfo.fileReportUrlList,
                // }
                if (this.authenticateInfo1.appraiseType == null) {
                    this.authenticateInfo1.appraiseType = ''
                } else {
                    if (this.authenticateInfo1.appraiseType == 1) {
                        this.authenticateInfo1.appraiseType = '自住'
                    } else if (this.authenticateInfo1.appraiseType == 2) {
                        this.authenticateInfo1.appraiseType = '生产经营'
                    } else if (this.authenticateInfo1.appraiseType == 3) {
                        this.authenticateInfo1.appraiseType = '公共用房'
                    }
                }
                if (this.authenticateInfo1.appraiseLevel == '' || this.authenticateInfo1.appraiseLevel == null) {
                    this.authenticateInfo1.appraiseLevel = ''
                } else {
                    this.authenticateInfo1.appraiseLevel = this.authenticateInfo1.appraiseLevel + '级'
                }
                if (res3.data.data.authenticateInfo.fileHousePictureUrlList != null) {
                    res3.data.data.authenticateInfo.fileHousePictureUrlList.forEach(item => {
                        this.fileHousePictureUrlList.push({
                            id: item.id,
                            url: window.g.BaseURL + 'api/upload/oss/preview?fileId=' + item.id,
                            isImage: true
                        })
                    })
                }
            }
            if (res3.data.data.recheckAuthenticateInfo != null) {
                this.formDataFHJD = res3.data.data.recheckAuthenticateInfo;
                if (this.formDataFHJD.appraiseLevel == '' || this.formDataFHJD.appraiseLevel == null) {
                    this.formDataFHJD.appraiseLevel = ''
                } else {
                    this.formDataFHJD.appraiseLevel = this.formDataFHJD.appraiseLevel + '级'
                }
                if (res3.data.data.recheckAuthenticateInfo.fileHousePictureUrlList != null) {
                    res3.data.data.recheckAuthenticateInfo.fileHousePictureUrlList.forEach(item => {
                        this.fileHousePictureUrlList1.push({
                            id: item.id,
                            url: window.g.BaseURL + 'api/upload/oss/preview?fileId=' + item.id,
                            isImage: true
                        })
                    })
                }
            }
            console.log(this.authenticateInfo1, 'this.authenticateInfo')
            // })
        },
        // inData(){
        //     // setTimeout(()=>{
        //     // this.$nextTick(() =>{
        //         this.getdangerHouseRemoldauditInfoV2()
        //         this.gethzinfo()
        //         this.getformDataZFXZ()
        //     // })
        //     // },500)
        // },
        getformDataZFXZ: async function () {
            let params = {
                "objectNo": this.wgxxInfo.objectNo
                // "objectNo":"60e897333ebe46c5a118f32471ca29e3"
            }
            const res1 = await houseRemoldV2HousingStatusget(params)
            if (res1.data.data != null) {
                this.formDataZFXZ = res1.data.data[0]
            } else {
                this.formDataZFXZ = this.wgxxInfo
                this.formDataZFXZ.structType = this.wgxxInfo.jglx
                this.formDataZFXZ.safeLevel = this.wgxxInfo.fwaqdj
            }
            if (this.formDataZFXZ.safeLevel == null) {
                this.formDataZFXZ.safeLevel = ''
            } else {
                this.formDataZFXZ.safeLevel = this.formDataZFXZ.safeLevel + '级'
            }
            if (this.formDataZFXZ.structType == null) {
                this.formDataZFXZ.structType = ''
            } else {
                if (this.formDataZFXZ.structType == 1) {
                    this.formDataZFXZ.structType = '砌体结构'
                } else if (this.formDataZFXZ.structType == 2) {
                    this.formDataZFXZ.structType = '底部框架-上部砌体结构'
                } else if (this.formDataZFXZ.structType == 3) {
                    this.formDataZFXZ.structType = '钢筋混凝土结构'
                } else if (this.formDataZFXZ.structType == 4) {
                    this.formDataZFXZ.structType = '钢结构'
                } else if (this.formDataZFXZ.structType == 5) {
                    this.formDataZFXZ.structType = '木(竹)结构'
                } else if (this.formDataZFXZ.structType == 8) {
                    this.formDataZFXZ.structType = '土木/石木结构'
                } else if (this.formDataZFXZ.structType == 7) {
                    this.formDataZFXZ.structType = '混杂结构'
                } else if (this.formDataZFXZ.structType == 6) {
                    this.formDataZFXZ.structType = '窑洞'
                } else if (this.formDataZFXZ.structType == 99) {
                    this.formDataZFXZ.structType = '其他'
                }
            }
        },
        gethzinfo: async function () {
            let params = {
                "objectNo": this.wgxxInfo.objectNo
                // "objectNo":"60e897333ebe46c5a118f32471ca29e3"
            }
            const res = await houseRemoldV2Difficultyget(params)
            console.log(res, 'ressss')
            if (res.data.data != null) {
                this.formData = res.data.data[0]
            } else {
                this.formData = this.wgxxInfo
            }
            if (this.formData.belongCity == null) {
                this.formData.belongCity = ''
                this.formData.cityName = ''
            } else if (this.formData.belongCounty == null) {
                this.formData.belongCounty = ''
                this.formData.cityName = `${this.formData.belongCity}`
            } else if (this.formData.belongTown == null) {
                this.formData.belongTown = ''
                this.formData.cityName = `${this.formData.belongCity}/${this.formData.belongCounty}`
            } else if (this.formData.belongVillage == null) {
                this.formData.belongVillage = ''
                this.formData.cityName = `${this.formData.belongCity}/${this.formData.belongCounty}/${this.formData.belongTown}`
            } else {
                this.formData.cityName = `${this.formData.belongCity}/${this.formData.belongCounty}/${this.formData.belongTown}/${this.formData.belongVillage}`
            }
            // this.formData.cityName = `${this.formData.belongCity}/${this.formData.belongCounty}/${this.formData.belongTown}/${this.formData.belongVillage}`
            this.formData.dataFrom = this.wgxxInfo.agencyType
            if (this.formData.dataFrom == 1) {
                this.formData.dataFrom = '镇街委托'
            }
            if (this.formData.dataFrom == 2) {
                this.formData.dataFrom = '农户委托'
            }
            const res1 = await houseRemoldV2HousingStatusget(params)
            if (res1.data.data != null) {
                this.formDataZFXZ = res1.data.data[0]
            } else {
                this.formDataZFXZ = this.wgxxInfo
                this.formDataZFXZ.structType = this.wgxxInfo.jglx
                this.formDataZFXZ.safeLevel = this.wgxxInfo.fwaqdj
            }
            if (this.formDataZFXZ.safeLevel == null) {
                this.formDataZFXZ.safeLevel = ''
            } else {
                this.formDataZFXZ.safeLevel = this.formDataZFXZ.safeLevel + '级'
            }
            if (this.formDataZFXZ.structType == null) {
                this.formDataZFXZ.structType = ''
            } else {
                if (this.formDataZFXZ.structType == 1) {
                    this.formDataZFXZ.structType = '砌体结构'
                } else if (this.formDataZFXZ.structType == 2) {
                    this.formDataZFXZ.structType = '底部框架-上部砌体结构'
                } else if (this.formDataZFXZ.structType == 3) {
                    this.formDataZFXZ.structType = '钢筋混凝土结构'
                } else if (this.formDataZFXZ.structType == 4) {
                    this.formDataZFXZ.structType = '钢结构'
                } else if (this.formDataZFXZ.structType == 5) {
                    this.formDataZFXZ.structType = '木(竹)结构'
                } else if (this.formDataZFXZ.structType == 8) {
                    this.formDataZFXZ.structType = '土木/石木结构'
                } else if (this.formDataZFXZ.structType == 7) {
                    this.formDataZFXZ.structType = '混杂结构'
                } else if (this.formDataZFXZ.structType == 6) {
                    this.formDataZFXZ.structType = '窑洞'
                } else if (this.formDataZFXZ.structType == 99) {
                    this.formDataZFXZ.structType = '其他'
                }
            }
            const res2 = await tFwZjfFxftgetSafe(this.wgxxInfo.checkNumber)
            if (res2.data.data != null) {
                this.formDataAQJG = res2.data.data[0]
            } else {
                this.formDataAQJG = this.wgxxInfo
            }

            const res4 = await getRenovateDetail(this.wgxxInfo.objectNo)
            // const res4 = await getRenovateDetail('60e897333ebe46c5a118f32471ca29e3')
            if (res4.data.data != null && res4.data.data.length > 0) {
                this.formDataZZCS = res4.data.data[0]
                if (this.formDataZZCS.belongCity == '' || this.formDataZZCS.belongCity == null) {
                    this.formDataZZCS.belongCity = ''
                    this.formDataZZCS.ZZcityName = ''
                } else if (this.formDataZZCS.belongCounty == '' || this.formDataZZCS.belongCounty == null) {
                    this.formDataZZCS.belongCounty = ''
                    this.formDataZZCS.ZZcityName = `${this.formDataZZCS.belongCity}`
                } else if (this.formDataZZCS.belongTown == '' || this.formDataZZCS.belongTown == null) {
                    this.formDataZZCS.belongTown = ''
                    this.formDataZZCS.ZZcityName = `${this.formDataZZCS.belongCity}/${this.formDataZZCS.belongCounty}`
                } else if (this.formDataZZCS.belongVillage == '' || this.formDataZZCS.belongVillage == null) {
                    this.formDataZZCS.belongVillage = ''
                    this.formDataZZCS.ZZcityName = `${this.formDataZZCS.belongCity}/${this.formDataZZCS.belongCounty}/${this.formDataZZCS.belongTown}`
                } else {
                    this.formDataZZCS.ZZcityName = `${this.formDataZZCS.belongCity}/${this.formDataZZCS.belongCounty}/${this.formDataZZCS.belongTown}/${this.formDataZZCS.belongVillage}`
                }
                // this.formDataZZCS.ZZcityName = `${this.formDataZZCS.belongCity}/${this.formDataZZCS.belongCounty}/${this.formDataZZCS.belongTown}/${this.formDataZZCS.belongVillage}`
                if (this.formDataZZCS.renovateStructure == null) {
                    this.formDataZZCS.renovateStructure = ''
                } else {
                    if (this.formDataZZCS.renovateStructure == 1) {
                        this.formDataZZCS.renovateStructure = '砌体结构'
                    } else if (this.formDataZZCS.renovateStructure == 2) {
                        this.formDataZZCS.renovateStructure = '底部框架-上部砌体结构'
                    } else if (this.formDataZZCS.renovateStructure == 3) {
                        this.formDataZZCS.renovateStructure = '钢筋混凝土结构'
                    } else if (this.formDataZZCS.renovateStructure == 4) {
                        this.formDataZZCS.renovateStructure = '钢结构'
                    } else if (this.formDataZZCS.renovateStructure == 5) {
                        this.formDataZZCS.renovateStructure = '木(竹)结构'
                    } else if (this.formDataZZCS.renovateStructure == 8) {
                        this.formDataZZCS.renovateStructure = '土木/石木结构'
                    } else if (this.formDataZZCS.renovateStructure == 7) {
                        this.formDataZZCS.renovateStructure = '混杂结构'
                    } else if (this.formDataZZCS.renovateStructure == 6) {
                        this.formDataZZCS.renovateStructure = '窑洞'
                    } else if (this.formDataZZCS.renovateStructure == 99) {
                        this.formDataZZCS.renovateStructure = '其他'
                    }
                }
            }
        },
    }
}
</script>

<style lang="scss" scoped>
#ProcessDetails {
    .vanpopupCon {
        padding: 10px;
        overflow-y: auto;
        height: calc(100vh - 45px);

        .text {
            font-size: 14px;
            line-height: 45px;
            border-bottom: 1px solid #ccc;
        }
    }

}
</style>

<style lang="scss">
#ProcessDetails {
    .van-field__label {
        width: auto !important;
        margin-right: 20px;
    }

    // .van-radio{
    //     height: 24px;
    // }
}
</style>
